package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketGoods;
import com.cskaoyan.bean.MarketGoodsExample;
import com.cskaoyan.bean.leihao.vo.HotGoodsListDTO;
import com.cskaoyan.bean.leihao.vo.NewGoodsListDTO;
import com.cskaoyan.bean.yangzihui.ListDTO;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yangzihui
 * @Description
 * @Create 2022-06-26 18:41
 * @Version
 */
public interface MarketGoodsMapper {
    long countByExample(MarketGoodsExample example);

    int deleteByExample(MarketGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketGoods record);

    int insertSelective(MarketGoods record);

    List<MarketGoods> selectByExampleWithBLOBs(MarketGoodsExample example);

    List<MarketGoods> selectByExample(MarketGoodsExample example);

    MarketGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExample(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByPrimaryKeySelective(MarketGoods record);

    int updateByPrimaryKeyWithBLOBs(MarketGoods record);

    int updateByPrimaryKey(MarketGoods record);

    List<ListDTO> selectByCategoryId(@Param("categoryId") Integer categoryId);

    List<HotGoodsListDTO> selectByIsHot();

    List<NewGoodsListDTO> selectByIsNew();

    List<HotGoodsListDTO> selectByCategoryList(@Param("categoryList") List<Integer> categoryList);

    Integer selectCount();

    List<HotGoodsListDTO> selectGoodsByCategoryId(Integer categoryId);

    Integer selectCategoryIdById(Integer id);

    Byte selectSortOrderById(Integer id);

    List<Integer> selectCategoryIdByGoodsIdList(@Param("goodsIdList") ArrayList<Integer> goodsIdList);

    List<HotGoodsListDTO> selectGoodsByKeyword(String keyword);

    List<HotGoodsListDTO> selectGoodsBybrandId(Integer brandId);

}
